﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using ZoneFiveSoftware.SportTracks;
using ZoneFiveSoftware.SportTracks.Actions;
using ZoneFiveSoftware.SportTracks.Data;
using ZoneFiveSoftware.SportTracks.Data.Settings;
using ZoneFiveSoftware.SportTracks.Plugin.Activities;
using ZoneFiveSoftware.SportTracks.Properties;
using ZoneFiveSoftware.Common.Data.Fitness;
using ZoneFiveSoftware.Common.Visuals;
using ZoneFiveSoftware.Common.Visuals.Chart;
using ZoneFiveSoftware.Common.Visuals.Fitness;
using BENBUN.Settings;
using BENBUN.UI.Controls;
using BENBUN.Utils;
using BENBUN.WIW;

namespace BENBUN.Views
{
    internal class BBBS_WIWView : IView, IDialogPage, INotifyPropertyChanged
    {
        private IApplication application;
        public event PropertyChangedEventHandler PropertyChanged;

        private WIWLogContainer viewcontrol = new WIWLogContainer();



        public BBBS_WIWView()
        {
        }

        public Control CreatePageControl()
        {
           return viewcontrol;
        }

        public bool HidePage()
        {
            return true;
        }

        public void ShowPage(string bookmark)
        {
            application = Plugin.GetApplication();
            viewcontrol.loadWIWData();
        }

        public void SubTitleClicked(Rectangle subTitleRect)
        {
            IApplication application = Plugin.GetApplication();
        }

        private void viewControl_FilterChanged(object sender, EventArgs e)
        {
            this.OnPropertyChanged("SubTitle");
        }
        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public void ThemeChanged(ITheme visualTheme)
        {
        }

        public void UICultureChanged(CultureInfo culture)
        {
            this.PropertyChanged.GetType();
        }

        public IList<IAction> Actions
        {
            get { return new IAction[] { new SettingsAction(), new HelpAction(), new DonateAction(), new BENBUNWebAction() }; }
        }

        public Guid Id
        {
            get { return GUIDStore.WIWView; }
        }

        public string PageName
        {
            get { return "Where in the World"; }
        }

        public IPageStatus Status
        {
            get { throw new NotImplementedException(); }
        }

        public string SubTitle
        {
            get
            {
                //return "to do here";
                return null;
            }
        }

        public bool SubTitleHyperlink
        {
            get
            {
                return false;
            }
        }

        public string TasksHeading
        {
            get
            {
                return "WIW #2";
            }
        }

        public string Title
        {
            get
            {
                return "Where in the World";
            }
        }
    }
}
